package com.zzh.tools;

import android.os.Environment;

import java.io.File;

/**
 * @author zhangzhihao
 * @email zhangzhihao@gongjiangren.net
 * @date 2020-07-02
 * @desc
 */
public class ToolConstantUtils {


    //请求权限组权限的回调标号
    public static final int MY_PERMISION_LIST = 101;
    //单个授权回调标号
    public static final int MY_SINGLE_PERMISION = 100;


    //1-10的静态int 数值
    public static final int MINUSONE = -1;
    public static final int ZERO = 0;
    public static final int ONE = 1;
    public static final int TWO = 2;
    public static final int THREE = 3;
    public static final int FOUR = 4;
    public static final int FIVE = 5;
    public static final int SIX = 6;
    public static final int SEVEN = 7;
    public static final int EIGHT = 8;
    public static final int NINE = 9;
    public static final int TEN = 10;
    public static final int ELEVEN = 11;


    //1-10的静态String 数值
    public static final String STRINGMINUSONE = "-1";
    public static final String STRINGZERO = "0";
    public static final String STRINGONE = "1";
    public static final String STRINGTWO = "2";
    public static final String STRINGTHREE = "3";
    public static final String STRINGFOUR = "4";
    public static final String STRINGFIVE = "5";
    public static final String STRINGSIX = "6";
    public static final String STRINGSEVEN = "7";
    public static final String STRINGEIGHT = "8";
    public static final String STRINGNINE = "9";
    public static final String STRINGTEN = "10";
    public static final String REFRESH = "1111";

    public static final String FRAGMENT_REFRESH = "FRAGMENT_REFRESH";
    public static final String ORDERFRAGMENT_REFRESH = "ORDERFRAGMENT_REFRESH";
    public static final String GRABSING_FAILURE = "GRABSING_FAILURE";

    //判断,当前的设备,
    public static final String UPDATE_ANDROID = "Android";


    //倒计时事件,1秒钟倒计时
    public static final int COUNT_DOWN_TIME = 1000;
    //线上异常收集sp
    public static final String CRASH_LOG = "CREASHLOG";

    //保存sp的用户表名
    public static final String USER_DATA_SP = "userdata";

    //配合加密使用的，加密字符串，为固定值，切勿修改，可能会导致部分数据加解密异常
    //加密的密文key必须是8个字节
    public static final String SAVE_KEY = "SAVEKEYC";
    public static final String TOKEN = "TOKEN";
    //经度
    public static final String LONGITUDE = "LONGITUDE";
    //    纬度
    public static final String LATITUDE = "LATITUDE";
    //设置按钮连续两次点击的时间间隔500毫秒或者是0.5秒
    public static final long CLICK_TIME_GAP = 800L;


//    //每次升级更新，该工具类都会自动更换App的版本号，闪屏界面过后，是否进行滑屏操作
//    public static final String SMOOTH_PLATE = "SMOOTHPLATE" + ToolPhoneCheckUtils.getAppVersionCode();
//    //每次提示用户，设置通知栏,绑定升级信息,每次更新都会提示
//    public static final String UPDATE_NOTICE = "UPDATANOTICE" + ToolPhoneCheckUtils.getAppVersionCode();

    //连续点击两次退出的时间间隔
    public static final long FINSH_APP_TIME = 2000L;

    //TODO：下载Apk的文件地址,注意这里加个点为隐藏目录
    public static final String ApkPath =
            Environment.getExternalStorageDirectory().getAbsolutePath() + "/.gjr/";
    //保存照片的地址
    public static final String PHOTO_PATH =
            Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + "GongJiangRen" + File.separator + ".photo" + File.separator;
    //保存相册的名称
    public static final String PHOTO_NAME = ".jpg";


    /*********************** intent传递数值常用的常量 ********************/
    public static final String PAST_NAME = "name";
    public static final String SEARCH_NAME = "SERCHNAME";
    public static final String CITY_CODE = "CITYCODE";
    public static final String TAB_INDEX = "TABINDEX";
    public static final String TYPE = "TYPE";
    public static final String OPEN_ID = "OPENID";
    public static final String MID = "id";
    public static final String PROVICE = "PROVICE";
    public static final String CITY = "CITY";
    public static final String AREA = "AREA";
    public static final String ENGINEERING_FRAGMENT = "ENGINEERINGFRAGMENT";
    public static final String ADDRESS = "ADDRESS";
    public static final String LINK_MAN = "linkman";


    public static final String MAIN_CITY_CODE = "MAINCITYCODE";
    public static final String MAIN_LAT = "MAINLAT";
    public static final String FIRST_MSG_LOCATION_INFO = "FIRSTMSGLOCATIONINFO";
    public static final String WORK_INFO = "WORKINFO";


    public static final String PRODUCT_SCROLL_START = "PRODUCT_SCROLL_START"; //app第一次启动，产品滑动介绍页面

    /**
     * 用户信息
     */
    public static final String IS_FIRST_START = "IS_FIRST_START";//app第一次启动，产品介绍页面
    public static final String IS_FIRST_START_LOCATION = "IS_FIRST_START_LOCATION";//app重启,定位判断
    public static final String NICKNAME = "NICKNAME";//用户名称


    public static final String THIRD_OPEN_ID = "THIRD_OPEN_ID";//第三方登录的openId
    public static final String THIRD_QQ_WEIXIN = "THIRD_QQ_WEIXIN";//第三方登录的方式QQ或者微信1为QQ,2为微信
    public static final String THIRD_NICKNAME = "THIRD_NICKNAME";//第三方登录的名称
    public static final String LOGIN_TYPE = "LOGIN_TYPE";//记录用户的登录方式,默认是1为账号密码登录,忘记密码等,2位第三方登录,3位短信登录

    public static final String MECHINE_HISTORY = "MECHINE_HISTORY";//机械设备历史搜索
    public static final String HOME_INDEX = "HOME_INDEX";//首页tab下标

    public static final String POSITION_LIST = "POSITION_LIST";//选择地址的城市名称列表
    public static final String CHILD_POSITION = "CHILD_POSITION";//当前定位的位置
    public static final String CHILD_POSITION1 = "CHILD_POSITION1";//当前定位的位置
    public static final String CHILD_POSITION2 = "CHILD_POSITION2";//当前定位的位置
    public static final String CHILD_POSITION3 = "CHILD_POSITION3";//当前定位的位置

    public static final String PUBLISH_ENGINEER_ACTIVITY = "PublishEngineerActivity";//发布工程信息的保存
    public static final String HISTORY_QUERY_ACTIVITY = "HistoryQueryActivity";//搜索历史的本地保存

    //更新匠币
    public static final String UPDATECOIN = "UPDATECOIN";

    public static final String DEFAULT_LOCATION_NAME = "DEFAULT_LOCATION_NAME";
    public static final String DEFAULT_LOCATION_CODE = "DEFAULT_LOCATION_CODE";

    /**
     * 匠人学堂模块常量
     */
    public static final int ENGINEER_ITEM_TITLE_TYPE = 1;
    public static final int ENGINEER_ITEM_CONTENT_TYPE = 0;
    public static final int ENGINEER_ITEM_VIDIO_CONTENT_TYPE = 2;

    //相关阅读界面type
    public static final int ENGINEER_SCHOOL_RELATIVE_TYPE = 1;
    //规范文档界面type
    public static final int ENGINEER_SCHOOL_DOCUMENT_TYPE = 0;
    //查看更多跳转页面传参
    public static final String ENGINEER_EXTRA_ID = "ENGINEER_EXTRA_ID";
    //工法交流
    public static final long ENGINEER_SKILL_ID = 1002L;
    //视频讲堂
    public static final long ENGINEER_VIDEO_ID = 1003L;
    //建筑知识
    public static final long ENGINEER_TECHONOLOGY_ID = 1004L;


    /*********************** 图片上传的地址*********************************/
    //环信 获取地址：kefu.easemob.com，“管理员模式 > 渠道管理 > 手机APP”页面的关联的“IM服务号”
    public static final String HX_IM = "kefuchannelimid_722937";

    public static final String EVENT_BUS_ORDER = "event_bus_order";
    public static final String SP_GET_COLLECT_SUB_MONEY_COUNT = "SP_GET_COLLECT_SUB_MONEY_COUNT";
    public static final String SP_GET_USER_AUTH_LIST = "SP_GET_USER_AUTH_LIST";
    public static final String SP_GET_REAL_AUTH_INFO = "SP_GET_REAL_AUTH_INFO";
    public static final String SP_GET_EXPERT_AUTH_INFO = "SP_GET_EXPERT_AUTH_INFO";

    /**
     * 首页GPS定位实体bean
     */
    public static final String MAIN_GPS_LOCATION = "MAIN_GPS_LOCATION";
    /**
     * 用户登录信息实体bean
     */
    public static final String MINE_LOGIN_BEAN = "MINE_LOGIN_BEAN_NEW";
}
